<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script src="./Promise copy.js"></script>


  <script>
    const p = new Promise((resolve,reject)=>{
      setTimeout(()=>{
        
        // resolve(1)
        reject(2)

      }, 0 )
    })
    p.then(
      value =>{
        console.log('onResovled' ,value);
      },
      reason =>{
        console.log('onRejected' , reason);
      }
    )
    .then(
      value => {
        console.log('onResolved2', value)
      },
      reason => {
        console.log('onRejected2', reason)
      }
    )
    .then(
      value => {
        console.log('onResolved3', value)
      },
      reason => {
        console.log('onRejected3', reason)
      }
    )
  </script>
</body>
</html>